import React, { Component } from 'react'
import Login from './Login'
import Layout from './Layout'

export default class Index extends Component {
  state = {
    isLogin: false
  }

  render () {
    // if (this.state.isLogin) {
    //   return <Layout />
    // } else {
    //   return <Login />
    // }

    // return <div>{this.state.isLogin ? <Layout /> : <Login />}</div>

    return (
      <div>
        {this.state.isLogin && <Layout />}
        {!this.state.isLogin && <Login />}
      </div>
    )
  }
}
